// File generated from our OpenAPI spec
namespace Stripe
{
    using Newtonsoft.Json;
    using Stripe.Infrastructure;

    public class ChargePaymentMethodDetailsSofort : StripeEntity<ChargePaymentMethodDetailsSofort>
    {
        /// <summary>
        /// Bank code of bank associated with the bank account.
        /// </summary>
        [JsonProperty("bank_code")]
        public string BankCode { get; set; }

        /// <summary>
        /// Name of the bank associated with the bank account.
        /// </summary>
        [JsonProperty("bank_name")]
        public string BankName { get; set; }

        /// <summary>
        /// Bank Identifier Code of the bank associated with the bank account.
        /// </summary>
        [JsonProperty("bic")]
        public string Bic { get; set; }

        /// <summary>
        /// Two-letter ISO code representing the country the bank account is located in.
        /// </summary>
        [JsonProperty("country")]
        public string Country { get; set; }

        #region Expandable GeneratedSepaDebit

        /// <summary>
        /// (ID of the PaymentMethod)
        /// The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
        /// </summary>
        [JsonIgnore]
        public string GeneratedSepaDebitId
        {
            get => this.InternalGeneratedSepaDebit?.Id;
            set => this.InternalGeneratedSepaDebit = SetExpandableFieldId(value, this.InternalGeneratedSepaDebit);
        }

        /// <summary>
        /// (Expanded)
        /// The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge.
        ///
        /// For more information, see the <a href="https://stripe.com/docs/expand">expand documentation</a>.
        /// </summary>
        [JsonIgnore]
        public PaymentMethod GeneratedSepaDebit
        {
            get => this.InternalGeneratedSepaDebit?.ExpandedObject;
            set => this.InternalGeneratedSepaDebit = SetExpandableFieldObject(value, this.InternalGeneratedSepaDebit);
        }

        [JsonProperty("generated_sepa_debit")]
        [JsonConverter(typeof(ExpandableFieldConverter<PaymentMethod>))]
        internal ExpandableField<PaymentMethod> InternalGeneratedSepaDebit { get; set; }
        #endregion

        #region Expandable GeneratedSepaDebitMandate

        /// <summary>
        /// (ID of the Mandate)
        /// The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
        /// </summary>
        [JsonIgnore]
        public string GeneratedSepaDebitMandateId
        {
            get => this.InternalGeneratedSepaDebitMandate?.Id;
            set => this.InternalGeneratedSepaDebitMandate = SetExpandableFieldId(value, this.InternalGeneratedSepaDebitMandate);
        }

        /// <summary>
        /// (Expanded)
        /// The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge.
        ///
        /// For more information, see the <a href="https://stripe.com/docs/expand">expand documentation</a>.
        /// </summary>
        [JsonIgnore]
        public Mandate GeneratedSepaDebitMandate
        {
            get => this.InternalGeneratedSepaDebitMandate?.ExpandedObject;
            set => this.InternalGeneratedSepaDebitMandate = SetExpandableFieldObject(value, this.InternalGeneratedSepaDebitMandate);
        }

        [JsonProperty("generated_sepa_debit_mandate")]
        [JsonConverter(typeof(ExpandableFieldConverter<Mandate>))]
        internal ExpandableField<Mandate> InternalGeneratedSepaDebitMandate { get; set; }
        #endregion

        /// <summary>
        /// Last four characters of the IBAN.
        /// </summary>
        [JsonProperty("iban_last4")]
        public string IbanLast4 { get; set; }

        /// <summary>
        /// Preferred language of the SOFORT authorization page that the customer is redirected to.
        /// Can be one of <c>de</c>, <c>en</c>, <c>es</c>, <c>fr</c>, <c>it</c>, <c>nl</c>, or
        /// <c>pl</c>.
        /// One of: <c>de</c>, <c>en</c>, <c>es</c>, <c>fr</c>, <c>it</c>, <c>nl</c>, or <c>pl</c>.
        /// </summary>
        [JsonProperty("preferred_language")]
        public string PreferredLanguage { get; set; }

        /// <summary>
        /// Owner's verified full name. Values are verified or provided by SOFORT directly (if
        /// supported) at the time of authorization or settlement. They cannot be set or mutated.
        /// </summary>
        [JsonProperty("verified_name")]
        public string VerifiedName { get; set; }
    }
}
